<?php
/**
 * Created by PhpStorm
 * USER MingTingLiang   QQ 915802070
 * Date 2020-12-16-016   20:45
 */


class UserInfo extends UserReg
{
    public $step = "step1";

    public function stepNext($user)
    {
        if ($user == null) {
            $user = new UserEntity();
            $user->user_name = $_POST['user_name'];
            $user->user_pass = $_POST['user_pass'];

            $_SESSION['user'] = json_encode($user);

        }

        $get_user= parent::stepNext($user);             // TODO: Change the autogenerated stub
        if ($get_user) {
            $_SESSION['user']=json_encode($get_user);

        }
    }

}